<style>
.editor-style-content * {max-width: 100%!important;box-sizing: border-box!important;-webkit-box-sizing: border-box!important;word-wrap: break-word!important;}
.editor-style-content p{margin:0 0;clear:both;line-height: 1.6;}
.editor-style-content h1,.editor-style-content h2,.editor-style-content h3,.editor-style-content h4,.editor-style-content h5,.editor-style-content h6{font-size:18px;}
.style-list{margin-bottom:30px;box-shadow: 0 0 3px rgba(172,165,150,0.5);background:#ede8de;padding:0px;position:relative;border-radius:2px;}
.style-list:hover{z-index:20;box-shadow: 0 0 5px rgba(172,165,150,0.5);}
.style-list:hover .tools{display:block;}
.style-list .content{background:#fefefe;padding:13px;}
.style-list .tools{text-align:left;width:100%;padding:15px;color:#FFF;}
.style-list .tools a,.style-list .tools a:hover{text-decoration: none;color:#3a3332;font-size:16px;}
.style-list .tools .title{height:24px;line-height:24px;}
.btn-primary,.style-list .tools .label-info{font-size:12px;background:#6b6261 !important;color:#FFF !important;font-weight: normal;border:0 none;}
.btn-primary:hover,.style-list .tools .label-info:hover{font-size:12px;background:#3a3332 !important;color:#FFF !important;font-weight: normal;}

.col-md-4{padding-left:20px;padding-right:20px;}
.btn-favorite,.btn-favorite:hover,.btn-favorite:focus{font-size:16px;color:#ed603a !important;}
.style-list .origin{position:absolute;top:0;right:0;height:32px;color:#FFF;font-weight:bold;padding:5px}
.nav-tabs > li.active > a:hover,.nav-tabs > li.active > a,.nav-tabs > li > a:hover{color:#f8f5ef !important;background:#6b6261 !important;border:0 none;}
.nav-tabs > li >a {background:#e6dfd0;color:#3a3332;padding:5px 15px;margin-right:25px;border-radius:15px;border:0 none;}
.nav-tabs {border-bottom: 0 none;}
</style>
<div class="container">	

<div>
	<p style="float:left;">排序：
	  <select id="sort-type" style="margin:5px;">
	  	<option {{if empty($_REQUEST['order'])||$_REQUEST['order']=='id'}}selected{{/if}} value="id">添加时间</option>
	  	<option {{if $_REQUEST['order']=='click_nums'}}selected{{/if}} value="click_nums">点击量</option>
	  	<option {{if $_REQUEST['order']=='favor_nums'}}selected{{/if}} value="favor_nums">收藏量</option>
	  </select>
  </p>
	<p>
		<form method="get" action="{{getSearchLinks($this->request,array(),array('name'))}}">
			{{loop $_GET $k $v}}
				<?php if($k=="name") continue; ?>
				<input type="hidden" name="{{$k}}" value="{{$v}}">
			{{/loop}}
		<p  class="form-inline">
	  	<input type="text" style="width:100px;padding:2px;height: 32px;" value="{{$_GET['name']}}" name="name" class="form-control"> <button type="submit">搜索</button>
	  	</p>
	  </form>
  </p>
  
 
  
</div>

		<portlet portlet="onlycontent"  title="{{$Category['Category']['name']}}">
				<?PHP if($total>0) { ?>
				<div id="editor-style-list" class="row clearfix ui-portlet-list">
				    <?PHP foreach($Category['datalist'] as $k => $item) {
						$item['slug'] = $item['slug']?$item['slug']:$item['id'];
    				?>	
					<div class="col-xs-12 col-md-4 mix">{{template editor_styles/_list}}</div>
					<?php } ?>
				</div>
				{{$page_navi}}
				<?php } ?>
		</portlet>
</div>

<script>
$(function(){
	
	$('#sort-type').change(function(){
		var url = "{{getSearchLinks($this->request,array(), array('order'))}}";
		if(url.indexOf('?') > 0){
			url = url + '&order='+this.value;
		}
		else{
			url = url + '?order='+this.value;
		}
		window.location.href = url;
	})
})
</script>